/*1942 game clone
 * Authors:
 * Abdollah Tabareh
 * Bharat Bhushan Konka
 * Martin Svensson 
 * Richard Zianne
 * Tigran Harutyunyan
 * 
 * 2010
*/

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;


namespace Game1942
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class FlyingObject : Microsoft.Xna.Framework.DrawableGameComponent
    {
        public int _power { get; set; }
        protected Texture2D _texture { get; set; }
        protected Rectangle _spriteRectangle;
        public Vector2 _position;
        protected Vector2 _speed; //vhat do we use this for? why is it a vector2 and not a float or int?
        protected SpriteBatch _spriteBatch;
        public FlyingObject(Game game)
            : base(game)
        {
            // TODO: Construct any child components here
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }
        

        /// <summary>
        /// increasePower increase the power of a flying object by a amount 
        /// and returns fhe curent power of the flying object
        /// </summary>
        /// <param name="amount">The amount to increase power by</param>
        /// <returns>the current power</returns>
        public int increasePower(int amount) 
        {
            return _power += amount;
        }
        /// <summary>
        /// decreasePower deincrease the power of a flying object by a amount
        /// and returns fhe curent power of the flying object
        /// </summary>
        /// <param name="amount">The amount to deincrease power by</param>
        /// <returns>the current power</returns>
        public int decreasePower(int amount)
        {
            return _power -= amount;
        }
        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }
        public Vector2 getPosition()
        {
            return _position;
        }

    }
}